<?php

include_once 'db.php';

class Partners extends Db {

    public $table_name = "partners";

    public function __construct() {
        parent::__construct();
    }
    
    public function get_row_by_id($id) {
        return parent::get_row_by_id($id);
    }

        public function count() {
        $query = 'SELECT count(*) as total FROM '.$this->table_name;//SQL query
        $data = parent::select($query);
        if (!empty($data)) return (int) $data[0]['total'];
        return $data;
    }
    public function select($params) {
        /**
         * TODO: Write your code here
         */
        
        $query = 'SELECT * FROM '.$this->table_name.' WHERE thumb !="" AND profile !="" AND description!=""';//SQL query
        $data = parent::select($query);
        return $data;
    }
    
    public function insert($params) {
        /**
         * TODO: Write your code here
         */
        $query = '';//SQL query
        $data = parent::insert($query);
        return $data;
    }
    public function update($params) {
        /**
         * TODO: Write your code here
         */
        $query = '';//SQL query
        $data = parent::update($query);
        return $data;
    }
    public function delete($params) {
        /**
         * TODO: Write your code here
         */
        $query = '';//SQL query
        $data = parent::delete($query);
        return $data;
    }

}
